Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commands/filestore: use new cmds lib #5673

Merged
merged 5 commits into from
Nov 6, 2018

Conversation

overbool
Copy link
Contributor

Refer: #5664

License: MIT
Signed-off-by: Overbool overbool.xu@gmail.com

@overbool overbool requested a review from Kubuxu as a code owner October 27, 2018 03:59
@overbool overbool force-pushed the refactor/commands/filestore branch from 672dfd0 to 28fc08a Compare October 28, 2018 03:31
@kevina kevina self-requested a review October 28, 2018 06:06
@kevina
Copy link
Contributor

kevina commented Oct 28, 2018

There seams to be a lot of changes here. Please give me a few days to look this over.

core/commands/filestore.go Outdated Show resolved Hide resolved
core/commands/filestore.go Outdated Show resolved Hide resolved
@overbool overbool force-pushed the refactor/commands/filestore branch from 794e8c7 to d67709a Compare October 30, 2018 07:44
@@ -150,7 +151,7 @@ For ERROR entries the error will also be printed to stderr.
Encoders: cmds.EncoderMap{
cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *filestore.ListRes) error {
if out.Status == filestore.StatusOtherError {
return fmt.Errorf(out.ErrorMsg)
fmt.Fprintf(os.Stderr, "%s\n", out.ErrorMsg)
Copy link
Contributor

@kevina kevina Oct 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be okay. Although i think we need to use PostRun here. I created an issue for it n go-ipfs-cmds: ipfs/go-ipfs-cmds#133.

Blocking for now to until others weigh in.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Stebalien confirmed in ipfs/go-ipfs-cmds#133 that we should be using PostRun here.

@Stebalien Stebalien mentioned this pull request Oct 31, 2018
73 tasks
@overbool overbool force-pushed the refactor/commands/filestore branch from d67709a to ed40684 Compare November 3, 2018 14:58
@kevina
Copy link
Contributor

kevina commented Nov 5, 2018

@overbool do you want me to take over this commit and fix it to use PostRun?

@overbool overbool force-pushed the refactor/commands/filestore branch from ed40684 to 25bba79 Compare November 6, 2018 01:45
@overbool
Copy link
Contributor Author

overbool commented Nov 6, 2018

@overbool do you want me to take over this commit and fix it to use PostRun?

Ok, thx.

Copy link
Contributor

@kevina kevina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor thing then LGTM.

if !ok {
return nil, e.TypeErr(r, v)
}
list := v.(*filestore.ListRes)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be:

list, ok := v.(*filestore.ListRes)
if !ok {
  return nil, e.TypeErr(r, v)
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kevina I had changed it, thx

@kevina
Copy link
Contributor

kevina commented Nov 6, 2018

@overbool

Sorry. I didn't see that you already converted the command to use PostRun. One minor change then it LGTM.

@overbool overbool force-pushed the refactor/commands/filestore branch from 25bba79 to 55572fe Compare November 6, 2018 06:07
Copy link
Contributor

@kevina kevina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

License: MIT
Signed-off-by: Overbool <overbool.xu@gmail.com>
License: MIT
Signed-off-by: Overbool <overbool.xu@gmail.com>
License: MIT
Signed-off-by: Overbool <overbool.xu@gmail.com>
License: MIT
Signed-off-by: Overbool <overbool.xu@gmail.com>
License: MIT
Signed-off-by: Overbool <overbool.xu@gmail.com>
@Stebalien Stebalien force-pushed the refactor/commands/filestore branch from 55572fe to b4b6fc6 Compare November 6, 2018 20:56
@ghost ghost assigned Stebalien Nov 6, 2018
@ghost ghost added the status/in-progress In progress label Nov 6, 2018
@Stebalien Stebalien merged commit a8dd21a into ipfs:master Nov 6, 2018
@ghost ghost removed the status/in-progress In progress label Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants